package com.xand.bt.api;

import java.util.Date;

public class MarketImageChangeNotify {

	private String marketLabel;
	
	private byte direction;
	
	private long price;
	
	private long volume;
	
	private long time;

	public String getMarketLabel() {
		return marketLabel;
	}

	public void setMarketLabel(String marketLabel) {
		this.marketLabel = marketLabel;
	}

	public byte getDirection() {
		return direction;
	}

	public void setDirection(byte direction) {
		this.direction = direction;
	}

	public long getPrice() {
		return price;
	}

	public void setPrice(long price) {
		this.price = price;
	}

	public long getVolume() {
		return volume;
	}

	public void setVolume(long volume) {
		this.volume = volume;
	}

	public long getTime() {
		return time;
	}

	public void setTime(long time) {
		this.time = time;
	}
	
	public String toString() {
		
		StringBuilder ret = new StringBuilder();
		
		ret.append("marketLabel=");
		ret.append(this.marketLabel);
		ret.append("; ");
		
		ret.append("direction=");
		if(this.direction == MarketApiConst.DIRECTION_ASK)
			ret.append("ASK");
		else
			ret.append("BID");
		ret.append("; ");
		
		ret.append("price=");
		ret.append(this.price);
		ret.append("; ");
		
		ret.append("volume=");
		ret.append(this.volume);
		ret.append("; ");
		
		Date d = new Date(time);
		ret.append("time=");
		ret.append(MarketApiConst.FULL_DATE_FORMAT.format(d));
		
		return ret.toString();
		
	}
	
}
